package javathree;

import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		Rectangle[] r=new Rectangle[2];
		Circle[] c=new Circle[2];
		int sumPerimeter=0;
		int sumArea=0;
		for (int i = 0; i < 2; i++) {
			int a=sc.nextInt();
			int b=sc.nextInt();
			r[i]=new Rectangle(b,a);
			sumPerimeter=sumPerimeter+r[i].getPerimeter(b, a);
			sumArea=sumArea+r[i].getArea(b, a);
		}
		for (int i = 0; i <2; i++) {
			int d=sc.nextInt();
			c[i]=new Circle(d);
			sumPerimeter=sumPerimeter+c[i].getPerimeter(d);
			sumArea=sumArea+c[i].getArea(d);
		}
		System.out.println(sumPerimeter);
		System.out.println(sumArea);
		System.out.println(Arrays.toString(r));
		System.out.println(Arrays.toString(c));
	}

}
